/**
 * 外部路由 --> 不需要任何用户权限的路由
 * - 登录
 * - 注册
 * - 404
 *
 */
// 登录子路由
const loginChildren = [
  {
    path: '/login/byPassword',
    name: 'byPassword',
    component: () => import('@/views/viewExterior/pages/LoginByPassword.vue')
  },
  {
    path: '/login/byQRCode',
    name: 'byQRCode',
    component: () => import('@/views/viewExterior/pages/LoginByQRCode.vue')
  },
  {
    path: '/login/byAuthCode',
    name: 'byAuthCode',
    component: () => import('@/views/viewExterior/pages/LoginByAuthCode.vue')
  }
]
const exteriorRouter = [
  {
    // 登录 --> 路由
    path: '/login',
    name: 'login',
    component: () => import('@/views/viewExterior/LoginView.vue'),
    redirect: '/login/byPassword',
    children: [...loginChildren]
  },
  {
    // 注册 --> 路由
    path: '/register',
    name: 'register',
    component: () => import('@/views/viewExterior/RegisterView.vue')
  }
]

export default exteriorRouter
